<h1><?php print( $h1 ); ?></h1>
<div class="guestbook">
<div id="guestbook-form">
	<script type="text/javascript">
		$(document).ready(function() {
	   		$('#entry_form').hide();
	        // shows the slickbox on clicking the noted link  
	        $('a#new_entry').click(function() {
	        	$('#entry_form').show('slow');
	        	return false;
	        });
		});     
	</script>
	<p><a href="" id="new_entry" style="text-decoration:none;">Neuen Eintrag anlegen</a></p> 
	<div id="entry_form">
	<?php echo form_open( 'guestbook/save/'.$guestbook_id ); ?>
	<fieldset>
		<ol>
	    	<li>
				<?php print form_label( $this->lang->line('guestbook_name'), 'name')?>
				<?php print form_input( 'name', '', 'id="name" class="text"' )?>
			</li>
	    	<li>
				<?php print form_label( $this->lang->line('guestbook_email'), 'email')?>
				<?php print form_input( 'email', '', 'id="email" class="text"' )?>
			</li>
	    	<li>
				<?php print form_label( $this->lang->line('guestbook_title'), 'title')?>
				<?php print form_input( 'title', '', 'id="title" class="text"' )?>
			</li>
	    	<li>
				<?php print form_label( $this->lang->line('guestbook_body'), 'body')?>
				<?php print form_textarea( 'body', '', 'id="body" class="text"' )?>
			</li>
	    	<li class="recaptcha">
	    		<script>
				var RecaptchaOptions = {
				   theme : 'clean',
				   lang: 'de'
				};
				</script>	    		
				<?php echo recaptcha_get_html( $publickey );  ?>
			</li>
			<li class="submit">
				<div class="buttons">
	                <button type="submit" class="positive-guestbook" name="submit" value="submit">
	                </button>
	            </div>
			</li>
		</ol>
	</fieldset>
	<?php echo form_close( ); ?>
	</div>
</div>
<?php
if( !empty( $text ) ){
	foreach( $text as $key => $value ){
		?>
<table class="Rah01" width="528" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="526" valign="top" height="30">
<table class="Rah02Head" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="LesTex" width="366" valign="top" height="30">
<span class="LesTexFe"><?php echo $value['title'] ." (". $value['name'] .")"; ?></span>
</td>
<td class="LesTexRe" width="158" valign="top">
<?php 
$datetime = explode( ' ', $value['timestamp'] );
$date = explode( '-', $datetime[0] );
echo $date[2] . "." . $date[1] . "." . $date[0];
?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table class="Rah03" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="MiMi" valign="top">
</td>
<td class="LesTexAdre" valign="top">
			<div class="content"><?php echo $value['body']; ?></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
		<?php 
	}
}
?>
</div>